import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../pages/Login.vue'
import Home from '../pages/Home.vue'
import phoneInfo from '../pages/PhoneInfo.vue'
import Clothes from "../pages/Clothes.vue"
import SeaFood from '../pages/SeaFood.vue'
import Books from "../pages/Books.vue"
import Shopcart from "../pages/shopcart.vue"
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    component: Login,
    meta: { title: '登录' }
  },
  {
    path: '/home',
    component: Home,
    meta: { title: '首页' }
  },
  {
    path: '/phoneInfo',
    component: phoneInfo,
    name: "phoneInfo",
    props: true,
    meta: { title: '商品详细' }
  },
  {
    path: '/clothes',
    component: Clothes,
    meta: { title: '服饰' }
  },
  {
    path: '/seafood',
    component: SeaFood,
    meta: { title: '生鲜' }
  },
  {
    path: '/books',
    component: Books,
    meta: { title: '生鲜' }
  },
  {
    path: '/shopcart',
    component: Shopcart,
    meta: { title: '生鲜' }

  }


]

const router = new VueRouter({
  routes

})

export default router
